package com.vnaloha.common.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import com.vnaloha.common.dao.UserDAO;

@Service(value = "userDetailsService")
public class UserDetailsServiceImpl implements UserDetailsService{
	
	/**
	 */
	@Autowired
	private UserDAO userDAO;
	
	@Override
	public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException {
		return userDAO.getUserByUsername(userName);
	}

}
